package com.etc.RCCPU006.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.etc.RCCPU005.service.ProductService;
import com.etc.RCCPU006.pojo.Consult_mst;
import com.etc.RCCPU006.service.ConsultService;
import com.etc.common.Code;
import com.etc.common.CodeMessage;

@RestController
public class ConsultReservationController {
	
	
	@Autowired
	ConsultService consultServiceImpl;
	
	
	@RequestMapping("/insertConsult.action")
	public CodeMessage insertConsult(Consult_mst c) {
		consultServiceImpl.insertConsult(c);
		return CodeMessage.success(Code.SUCCESS_SHOW, "预约成功", null);
	}
	
	
	@RequestMapping("/selectProductInfo.action")
	public CodeMessage selectProductInfo(){
		List<Map> list = consultServiceImpl.selectProductInfo();
		return CodeMessage.success(Code.SUCESS,null, list); 
	} 
}
